﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Security;

namespace SSCCMembership.Web.Services.Members
{
    [ErrorHandlerBehavior]
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class ChangePasswordService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="OldPassword"></param>
        /// <param name="NewPassword"></param>
        /// <returns>True if the update was successful</returns>
        [OperationContract]
        public bool ChangePassword(string OldPassword, string NewPassword)
        {
            return Membership.GetUser().ChangePassword(OldPassword, NewPassword);
        }

        // Add more operations here and mark them with [OperationContract]
    }
}
